package util;


import java.util.LinkedList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Teddy
 */
public class StringUtil {

    static  List<Character> numbers = null;
    static {
        numbers = new LinkedList<Character>();
        for(short i =0;i<10;i++){
            numbers.add((char)('0'+i));
        }
         numbers.add('.');
         numbers.add(',');
    }
    public static boolean isNumber(String string) {
       for(char c : string.toCharArray()){
        if(!numbers.contains(c)){
            return false;
        }
       }
       return true;
    }
}
